home *** CD-ROM | disk | FTP | other *** search
/ The Games Machine 113 / XENIATGM113.iso / Patch / No One Lives Forever / NOLFUpdate003.exe / Setup / French / french.rul < prev    next >
Text File  |  2001-04-25  |  3KB  |  101 lines

  1. //
  2. // FRENCH UPDATE setup.rul
  3. //
  4. // NOTE:  Changes made to this script should be made to the scripts for each 
  5. //          other language too!
  6. //
  7.  
  8. // Game & folder names
  9. #define APP_TITLE       "Mise α jour de NOLF (v1.003)"
  10. #define APP_NAME        "No One Lives Forever"
  11. #define APP_VERSION     "1.0"
  12. #define APP_KEY         "NOLF.exe"
  13. #define DEFAULT_PATH    "Fox\\No One Lives Forever"
  14. #define DEFAULT_GROUP   "Fox Interactive\\No One Lives Forever"
  15. #define UPDATE_VERSION    "1.003"
  16. #define UPDATE_COMMAND    "-rez Nolfu003.rez -rez Nolfcres003.rez"
  17. #define README_FILE        "READMEU003.TXT"
  18.  
  19. declare
  20.     NUMBER  nResult;
  21.     NUMBER  nType, nSize;
  22.     STRING  svSrcDir, svTargetDir;
  23.     STRING  svRegKey;
  24.     STRING  svTemp;
  25.     STRING  svVersion;
  26.  
  27. program
  28. start:
  29.     // Set paths
  30.     svSrcDir     = SRCDIR ^ "..\\..\\";
  31.  
  32.     // Setup screen & title
  33.     Enable(BACKGROUND);
  34.     SetColor(BACKGROUND, RGB(236, 164, 4));
  35.     SetTitle(APP_TITLE, 26, WHITE);
  36.  
  37.     SetColor(STATUSBAR, BK_SOLIDBLUE);
  38.     PlaceBitmap(svSrcDir ^ "SETUP\\NOLF1.BMP", 1, CENTERED, CENTERED, CENTERED);
  39.     Delay(2);
  40.  
  41.     // Get installed path from registry
  42.     RegDBSetDefaultRoot(HKEY_LOCAL_MACHINE);
  43.     svRegKey = "Software\\Monolith Productions\\" + APP_NAME + "\\" + APP_VERSION;
  44.     nType = REGDB_STRING;
  45.     nSize = -1;
  46.     nResult = RegDBGetKeyValueEx(svRegKey, "WorkingDirectory", nType, svTargetDir, nSize);
  47.     if (nResult < 0) then
  48.         svTemp = "Impossible de mettre α jour " + APP_NAME + " α la version " + UPDATE_VERSION + "!\n\nVΘrifiez que le jeu a ΘtΘ correctement installΘ.";
  49.         MessageBox(svTemp, WARNING);
  50.         exit;
  51.     endif;
  52.  
  53.     // Check version number of what's already installed
  54.     nType = REGDB_STRING;
  55.     nSize = -1;
  56.     nResult = RegDBGetKeyValueEx(svRegKey, "Version", nType, svVersion, nSize);
  57.     if (nResult = 0) then
  58.         nResult = StrCompare(svVersion, UPDATE_VERSION);
  59.         if (nResult > 0) then
  60.             svTemp = "Vous utilisez la version " + svVersion + " de " + APP_NAME +
  61.             ".\n\nUne mise α jour vers la version " + UPDATE_VERSION + 
  62.             " est donc impossible.\n\nVous pouvez tΘlΘcharger les derniΦres" +
  63.             " mises α jour du jeu α partir du site http://www.the-operative.com";
  64.             MessageBox(svTemp, INFORMATION);
  65.             exit;
  66.         endif;
  67.     endif;
  68.  
  69.     // Show status window
  70.     Disable(FEEDBACK_FULL);
  71.     Enable(STATUS);
  72.     Enable(INDVFILESTATUS);
  73.     PlaceWindow(STATUS, CENTERED, 0, LOWER_RIGHT);
  74.     SetStatusWindow(0, "Mise α jour de " + APP_NAME + "...");
  75.  
  76.     // Copy all game files...
  77.     StatusUpdate(ON, 100);
  78.     SRCDIR    = svSrcDir ^ "GAME";
  79.     TARGETDIR = svTargetDir;
  80.     CopyFile("*.*", "*.*");
  81.  
  82.     // Copy language-specific files...
  83.     SRCDIR = svSrcDir ^ "GAME\\FRENCH";
  84.     CopyFile("*.*", "*.*");
  85.  
  86.     // Display done message
  87.     SetStatusWindow(1000, "Mise α jour terminΘe !");
  88.  
  89.     // Set new registry keys
  90.     RegDBSetDefaultRoot(HKEY_LOCAL_MACHINE);
  91.     RegDBSetKeyValueEx(svRegKey, "Version", REGDB_STRING, UPDATE_VERSION, -1);
  92.     RegDBSetKeyValueEx(svRegKey, "Update Command Line", REGDB_STRING, UPDATE_COMMAND, -1);
  93.  
  94.     // Do the readme...
  95.  
  96.     svTemp = "La mise α jour de " + APP_NAME + " est terminΘe. Souhaitez-vous lire le fichier LISEZMOI maintenant ?";
  97.     if (AskYesNo(svTemp, YES) = YES) then
  98.         LaunchAppAndWait("NOTEPAD.EXE " + svTargetDir ^ README_FILE, "", NOWAIT);
  99.     endif;
  100.  
  101. exit;